3.93 \(\int \frac{(x+x^2)^{3/2}}{1+x^2} \, dx\)

Optimal. Leaf size=130 \[ \frac{1}{4} \sqrt{x^2+x} (2 x+5)+\sqrt{1+\sqrt{2}} \tan ^{-1}\left (\frac{-x+\sqrt{2}+1}{\sqrt{2 \left (1+\sqrt{2}\right )} \sqrt{x^2+x}}\right )-\sqrt{\sqrt{2}-1} \tanh ^{-1}\left (\frac{-x-\sqrt{2}+1}{\sqrt{2 \left (\sqrt{2}-1\right )} \sqrt{x^2+x}}\right )-\frac{5}{4} \tanh ^{-1}\left (\frac{x}{\sqrt{x^2+x}}\right ) \]

[Out]

((5 + 2*x)*Sqrt[x + x^2])/4 + Sqrt[1 + Sqrt[2]]*ArcTan[(1 + Sqrt[2] - x)/(Sqrt[2*(1 + Sqrt[2])]*Sqrt[x + x^2])
] - Sqrt[-1 + Sqrt[2]]*ArcTanh[(1 - Sqrt[2] - x)/(Sqrt[2*(-1 + Sqrt[2])]*Sqrt[x + x^2])] - (5*ArcTanh[x/Sqrt[x
 + x^2]])/4

________________________________________________________________________________________

Rubi [A]  time = 0.160066, antiderivative size = 130, normalized size of antiderivative = 1., number of steps used = 10, number of rules used = 9, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.529, Rules used = {978, 1078, 620, 206, 12, 1036, 1030, 207, 203} \[ \frac{1}{4} \sqrt{x^2+x} (2 x+5)+\sqrt{1+\sqrt{2}} \tan ^{-1}\left (\frac{-x+\sqrt{2}+1}{\sqrt{2 \left (1+\sqrt{2}\right )} \sqrt{x^2+x}}\right )-\sqrt{\sqrt{2}-1} \tanh ^{-1}\left (\frac{-x-\sqrt{2}+1}{\sqrt{2 \left (\sqrt{2}-1\right )} \sqrt{x^2+x}}\right )-\frac{5}{4} \tanh ^{-1}\left (\frac{x}{\sqrt{x^2+x}}\right ) \]

Antiderivative was successfully verified.

[In]

Int[(x + x^2)^(3/2)/(1 + x^2),x]

[Out]

((5 + 2*x)*Sqrt[x + x^2])/4 + Sqrt[1 + Sqrt[2]]*ArcTan[(1 + Sqrt[2] - x)/(Sqrt[2*(1 + Sqrt[2])]*Sqrt[x + x^2])
] - Sqrt[-1 + Sqrt[2]]*ArcTanh[(1 - Sqrt[2] - x)/(Sqrt[2*(-1 + Sqrt[2])]*Sqrt[x + x^2])] - (5*ArcTanh[x/Sqrt[x
 + x^2]])/4

Rule 978

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_)*((d_.) + (f_.)*(x_)^2)^(q_), x_Symbol] :> Simp[((b*(3*p + 2*q) +
2*c*(p + q)*x)*(a + b*x + c*x^2)^(p - 1)*(d + f*x^2)^(q + 1))/(2*f*(p + q)*(2*p + 2*q + 1)), x] - Dist[1/(2*f*
(p + q)*(2*p + 2*q + 1)), Int[(a + b*x + c*x^2)^(p - 2)*(d + f*x^2)^q*Simp[b^2*d*(p - 1)*(2*p + q) - (p + q)*(
b^2*d*(1 - p) - 2*a*(c*d - a*f*(2*p + 2*q + 1))) - (2*b*(c*d - a*f)*(1 - p)*(2*p + q) - 2*(p + q)*b*(2*c*d*(2*
p + q) - (c*d + a*f)*(2*p + 2*q + 1)))*x + (b^2*f*p*(1 - p) + 2*c*(p + q)*(c*d*(2*p - 1) - a*f*(4*p + 2*q - 1)
))*x^2, x], x], x] /; FreeQ[{a, b, c, d, f, q}, x] && NeQ[b^2 - 4*a*c, 0] && GtQ[p, 1] && NeQ[p + q, 0] && NeQ
[2*p + 2*q + 1, 0] &&  !IGtQ[p, 0] &&  !IGtQ[q, 0]

Rule 1078

Int[((A_.) + (B_.)*(x_) + (C_.)*(x_)^2)/(((a_) + (c_.)*(x_)^2)*Sqrt[(d_.) + (e_.)*(x_) + (f_.)*(x_)^2]), x_Sym
bol] :> Dist[C/c, Int[1/Sqrt[d + e*x + f*x^2], x], x] + Dist[1/c, Int[(A*c - a*C + B*c*x)/((a + c*x^2)*Sqrt[d
+ e*x + f*x^2]), x], x] /; FreeQ[{a, c, d, e, f, A, B, C}, x] && NeQ[e^2 - 4*d*f, 0]

Rule 620

Int[1/Sqrt[(b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> Dist[2, Subst[Int[1/(1 - c*x^2), x], x, x/Sqrt[b*x + c*x^2
]], x] /; FreeQ[{b, c}, x]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 1036

Int[((g_.) + (h_.)*(x_))/(((a_) + (c_.)*(x_)^2)*Sqrt[(d_.) + (e_.)*(x_) + (f_.)*(x_)^2]), x_Symbol] :> With[{q
 = Rt[(c*d - a*f)^2 + a*c*e^2, 2]}, Dist[1/(2*q), Int[Simp[-(a*h*e) - g*(c*d - a*f - q) + (h*(c*d - a*f + q) -
 g*c*e)*x, x]/((a + c*x^2)*Sqrt[d + e*x + f*x^2]), x], x] - Dist[1/(2*q), Int[Simp[-(a*h*e) - g*(c*d - a*f + q
) + (h*(c*d - a*f - q) - g*c*e)*x, x]/((a + c*x^2)*Sqrt[d + e*x + f*x^2]), x], x]] /; FreeQ[{a, c, d, e, f, g,
 h}, x] && NeQ[e^2 - 4*d*f, 0] && NegQ[-(a*c)]

Rule 1030

Int[((g_) + (h_.)*(x_))/(((a_) + (c_.)*(x_)^2)*Sqrt[(d_.) + (e_.)*(x_) + (f_.)*(x_)^2]), x_Symbol] :> Dist[-2*
a*g*h, Subst[Int[1/Simp[2*a^2*g*h*c + a*e*x^2, x], x], x, Simp[a*h - g*c*x, x]/Sqrt[d + e*x + f*x^2]], x] /; F
reeQ[{a, c, d, e, f, g, h}, x] && EqQ[a*h^2*e + 2*g*h*(c*d - a*f) - g^2*c*e, 0]

Rule 207

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTanh[(Rt[b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{\left (x+x^2\right )^{3/2}}{1+x^2} \, dx &=\frac{1}{4} (5+2 x) \sqrt{x+x^2}-\frac{1}{2} \int \frac{\frac{5}{4}+4 x+\frac{5 x^2}{4}}{\left (1+x^2\right ) \sqrt{x+x^2}} \, dx\\ &=\frac{1}{4} (5+2 x) \sqrt{x+x^2}-\frac{1}{2} \int \frac{4 x}{\left (1+x^2\right ) \sqrt{x+x^2}} \, dx-\frac{5}{8} \int \frac{1}{\sqrt{x+x^2}} \, dx\\ &=\frac{1}{4} (5+2 x) \sqrt{x+x^2}-\frac{5}{4} \operatorname{Subst}\left (\int \frac{1}{1-x^2} \, dx,x,\frac{x}{\sqrt{x+x^2}}\right )-2 \int \frac{x}{\left (1+x^2\right ) \sqrt{x+x^2}} \, dx\\ &=\frac{1}{4} (5+2 x) \sqrt{x+x^2}-\frac{5}{4} \tanh ^{-1}\left (\frac{x}{\sqrt{x+x^2}}\right )+\frac{\int \frac{-1+\left (-1-\sqrt{2}\right ) x}{\left (1+x^2\right ) \sqrt{x+x^2}} \, dx}{\sqrt{2}}-\frac{\int \frac{-1+\left (-1+\sqrt{2}\right ) x}{\left (1+x^2\right ) \sqrt{x+x^2}} \, dx}{\sqrt{2}}\\ &=\frac{1}{4} (5+2 x) \sqrt{x+x^2}-\frac{5}{4} \tanh ^{-1}\left (\frac{x}{\sqrt{x+x^2}}\right )+\left (-2+\sqrt{2}\right ) \operatorname{Subst}\left (\int \frac{1}{2 \left (1-\sqrt{2}\right )+x^2} \, dx,x,\frac{-1+\sqrt{2}+x}{\sqrt{x+x^2}}\right )-\left (2+\sqrt{2}\right ) \operatorname{Subst}\left (\int \frac{1}{2 \left (1+\sqrt{2}\right )+x^2} \, dx,x,\frac{-1-\sqrt{2}+x}{\sqrt{x+x^2}}\right )\\ &=\frac{1}{4} (5+2 x) \sqrt{x+x^2}+\sqrt{1+\sqrt{2}} \tan ^{-1}\left (\frac{1+\sqrt{2}-x}{\sqrt{2 \left (1+\sqrt{2}\right )} \sqrt{x+x^2}}\right )-\sqrt{-1+\sqrt{2}} \tanh ^{-1}\left (\frac{1-\sqrt{2}-x}{\sqrt{2 \left (-1+\sqrt{2}\right )} \sqrt{x+x^2}}\right )-\frac{5}{4} \tanh ^{-1}\left (\frac{x}{\sqrt{x+x^2}}\right )\\ \end{align*}

Mathematica [C]  time = 0.171591, size = 120, normalized size = 0.92 \[ \frac{\sqrt{x} \sqrt{x+1} \left (2 \sqrt{x+1} x^{3/2}+5 \sqrt{x+1} \sqrt{x}+4 (-1+i)^{3/2} \tan ^{-1}\left (\sqrt{-1+i} \sqrt{\frac{x}{x+1}}\right )-5 \sinh ^{-1}\left (\sqrt{x}\right )+4 (1+i)^{3/2} \tanh ^{-1}\left (\sqrt{1+i} \sqrt{\frac{x}{x+1}}\right )\right )}{4 \sqrt{x (x+1)}} \]

Antiderivative was successfully verified.

[In]

Integrate[(x + x^2)^(3/2)/(1 + x^2),x]

[Out]

(Sqrt[x]*Sqrt[1 + x]*(5*Sqrt[x]*Sqrt[1 + x] + 2*x^(3/2)*Sqrt[1 + x] - 5*ArcSinh[Sqrt[x]] + 4*(-1 + I)^(3/2)*Ar
cTan[Sqrt[-1 + I]*Sqrt[x/(1 + x)]] + 4*(1 + I)^(3/2)*ArcTanh[Sqrt[1 + I]*Sqrt[x/(1 + x)]]))/(4*Sqrt[x*(1 + x)]
)

________________________________________________________________________________________

Maple [B]  time = 0.127, size = 789, normalized size = 6.1 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^2+x)^(3/2)/(x^2+1),x)

[Out]

1/2*x*(x^2+x)^(1/2)+5/4*(x^2+x)^(1/2)-5/8*ln(x+1/2+(x^2+x)^(1/2))+1/2*(4*(-2^(1/2)-1+x)^2/(1-x-2^(1/2))^2-3*(-
2^(1/2)-1+x)^2/(1-x-2^(1/2))^2*2^(1/2)+4+3*2^(1/2))^(1/2)*2^(1/2)*((-2+2*2^(1/2))^(1/2)*arctan(1/2*((3*2^(1/2)
-4)*(-(-2^(1/2)-1+x)^2/(1-x-2^(1/2))^2+12*2^(1/2)+17))^(1/2)*(-2+2*2^(1/2))^(1/2)*(24*(-2^(1/2)-1+x)^2/(1-x-2^
(1/2))^2+17*(-2^(1/2)-1+x)^2/(1-x-2^(1/2))^2*2^(1/2)-2^(1/2))*(3*2^(1/2)-4)*(-2^(1/2)-1+x)/(1-x-2^(1/2))/((-2^
(1/2)-1+x)^4/(1-x-2^(1/2))^4-34*(-2^(1/2)-1+x)^2/(1-x-2^(1/2))^2+1))*(1+2^(1/2))^(1/2)*2^(1/2)-2*(-2+2*2^(1/2)
)^(1/2)*arctan(1/2*((3*2^(1/2)-4)*(-(-2^(1/2)-1+x)^2/(1-x-2^(1/2))^2+12*2^(1/2)+17))^(1/2)*(-2+2*2^(1/2))^(1/2
)*(24*(-2^(1/2)-1+x)^2/(1-x-2^(1/2))^2+17*(-2^(1/2)-1+x)^2/(1-x-2^(1/2))^2*2^(1/2)-2^(1/2))*(3*2^(1/2)-4)*(-2^
(1/2)-1+x)/(1-x-2^(1/2))/((-2^(1/2)-1+x)^4/(1-x-2^(1/2))^4-34*(-2^(1/2)-1+x)^2/(1-x-2^(1/2))^2+1))*(1+2^(1/2))
^(1/2)-4*arctanh(1/2*(4*(-2^(1/2)-1+x)^2/(1-x-2^(1/2))^2-3*(-2^(1/2)-1+x)^2/(1-x-2^(1/2))^2*2^(1/2)+4+3*2^(1/2
))^(1/2)/(1+2^(1/2))^(1/2))*2^(1/2)+6*arctanh(1/2*(4*(-2^(1/2)-1+x)^2/(1-x-2^(1/2))^2-3*(-2^(1/2)-1+x)^2/(1-x-
2^(1/2))^2*2^(1/2)+4+3*2^(1/2))^(1/2)/(1+2^(1/2))^(1/2)))/(-(3*(-2^(1/2)-1+x)^2/(1-x-2^(1/2))^2*2^(1/2)-4*(-2^
(1/2)-1+x)^2/(1-x-2^(1/2))^2-3*2^(1/2)-4)/(1+(-2^(1/2)-1+x)/(1-x-2^(1/2)))^2)^(1/2)/(1+(-2^(1/2)-1+x)/(1-x-2^(
1/2)))/(3*2^(1/2)-4)/(1+2^(1/2))^(1/2)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (x^{2} + x\right )}^{\frac{3}{2}}}{x^{2} + 1}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^2+x)^(3/2)/(x^2+1),x, algorithm="maxima")

[Out]

integrate((x^2 + x)^(3/2)/(x^2 + 1), x)

________________________________________________________________________________________

Fricas [B]  time = 2.03948, size = 2356, normalized size = 18.12 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^2+x)^(3/2)/(x^2+1),x, algorithm="fricas")

[Out]

-1/8*8^(1/4)*sqrt(2*sqrt(2) + 4)*(sqrt(2) - 2)*log(8*x^2 - 8*sqrt(x^2 + x)*x + 2*(8^(1/4)*sqrt(x^2 + x)*(sqrt(
2) - 1) - 8^(1/4)*(sqrt(2)*x - x - 1))*sqrt(2*sqrt(2) + 4) + 4*x + 4*sqrt(2) + 4) + 1/8*8^(1/4)*sqrt(2*sqrt(2)
 + 4)*(sqrt(2) - 2)*log(8*x^2 - 8*sqrt(x^2 + x)*x - 2*(8^(1/4)*sqrt(x^2 + x)*(sqrt(2) - 1) - 8^(1/4)*(sqrt(2)*
x - x - 1))*sqrt(2*sqrt(2) + 4) + 4*x + 4*sqrt(2) + 4) + 1/2*8^(1/4)*sqrt(2)*sqrt(2*sqrt(2) + 4)*arctan(1/7*sq
rt(2)*(sqrt(2)*(5*x + 1) + 6*x + 4) + 1/112*sqrt(8*x^2 - 8*sqrt(x^2 + x)*x - 2*(8^(1/4)*sqrt(x^2 + x)*(sqrt(2)
 - 1) - 8^(1/4)*(sqrt(2)*x - x - 1))*sqrt(2*sqrt(2) + 4) + 4*x + 4*sqrt(2) + 4)*(8*sqrt(2)*(5*sqrt(2) + 6) + (
8^(3/4)*(5*sqrt(2) + 6) + 8*8^(1/4)*(2*sqrt(2) + 1))*sqrt(2*sqrt(2) + 4) + 64*sqrt(2) + 32) - 1/7*sqrt(x^2 + x
)*(sqrt(2)*(5*sqrt(2) + 6) + 8*sqrt(2) + 4) + 1/7*sqrt(2)*(8*x + 3) + 1/56*(8^(3/4)*(sqrt(2)*(5*x + 1) + 6*x +
 4) - sqrt(x^2 + x)*(8^(3/4)*(5*sqrt(2) + 6) + 8*8^(1/4)*(2*sqrt(2) + 1)) + 8*8^(1/4)*(sqrt(2)*(2*x - 1) + x +
 3))*sqrt(2*sqrt(2) + 4) + 4/7*x + 5/7) + 1/2*8^(1/4)*sqrt(2)*sqrt(2*sqrt(2) + 4)*arctan(-1/7*sqrt(2)*(sqrt(2)
*(5*x + 1) + 6*x + 4) - 1/112*sqrt(8*x^2 - 8*sqrt(x^2 + x)*x + 2*(8^(1/4)*sqrt(x^2 + x)*(sqrt(2) - 1) - 8^(1/4
)*(sqrt(2)*x - x - 1))*sqrt(2*sqrt(2) + 4) + 4*x + 4*sqrt(2) + 4)*(8*sqrt(2)*(5*sqrt(2) + 6) - (8^(3/4)*(5*sqr
t(2) + 6) + 8*8^(1/4)*(2*sqrt(2) + 1))*sqrt(2*sqrt(2) + 4) + 64*sqrt(2) + 32) + 1/7*sqrt(x^2 + x)*(sqrt(2)*(5*
sqrt(2) + 6) + 8*sqrt(2) + 4) - 1/7*sqrt(2)*(8*x + 3) + 1/56*(8^(3/4)*(sqrt(2)*(5*x + 1) + 6*x + 4) - sqrt(x^2
 + x)*(8^(3/4)*(5*sqrt(2) + 6) + 8*8^(1/4)*(2*sqrt(2) + 1)) + 8*8^(1/4)*(sqrt(2)*(2*x - 1) + x + 3))*sqrt(2*sq
rt(2) + 4) - 4/7*x - 5/7) + 1/4*sqrt(x^2 + x)*(2*x + 5) + 5/8*log(-2*x + 2*sqrt(x^2 + x) - 1)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\left (x \left (x + 1\right )\right )^{\frac{3}{2}}}{x^{2} + 1}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x**2+x)**(3/2)/(x**2+1),x)

[Out]

Integral((x*(x + 1))**(3/2)/(x**2 + 1), x)

________________________________________________________________________________________

Giac [C]  time = 1.41808, size = 369, normalized size = 2.84 \begin{align*} \left (\frac{1}{4} i + \frac{1}{4}\right ) \, \sqrt{2 \, \sqrt{2} - 2}{\left (\frac{i}{\sqrt{2} - 1} + 1\right )} \log \left (2 \, \sqrt{10 \, \sqrt{2} - 14}{\left (-\frac{i}{5 \, \sqrt{2} - 7} + 1\right )} - \left (4 i + 8\right ) \, x + \left (4 i + 8\right ) \, \sqrt{x^{2} + x} + 8 i - 4\right ) - \left (\frac{1}{4} i + \frac{1}{4}\right ) \, \sqrt{2 \, \sqrt{2} - 2}{\left (\frac{i}{\sqrt{2} - 1} + 1\right )} \log \left (-2 \, \sqrt{10 \, \sqrt{2} - 14}{\left (-\frac{i}{5 \, \sqrt{2} - 7} + 1\right )} - \left (4 i + 8\right ) \, x + \left (4 i + 8\right ) \, \sqrt{x^{2} + x} + 8 i - 4\right ) + \left (\frac{1}{4} i + \frac{1}{4}\right ) \, \sqrt{2 \, \sqrt{2} + 2}{\left (\frac{i}{\sqrt{2} + 1} + 1\right )} \log \left (2 \, \sqrt{2 \, \sqrt{2} - 2}{\left (-\frac{i}{\sqrt{2} - 1} + 1\right )} - 4 \, x + 4 \, \sqrt{x^{2} + x} - 4 i\right ) - \left (\frac{1}{4} i + \frac{1}{4}\right ) \, \sqrt{2 \, \sqrt{2} + 2}{\left (\frac{i}{\sqrt{2} + 1} + 1\right )} \log \left (-2 \, \sqrt{2 \, \sqrt{2} - 2}{\left (-\frac{i}{\sqrt{2} - 1} + 1\right )} - 4 \, x + 4 \, \sqrt{x^{2} + x} - 4 i\right ) + \frac{1}{4} \, \sqrt{x^{2} + x}{\left (2 \, x + 5\right )} + \frac{5}{8} \, \log \left ({\left | -2 \, x + 2 \, \sqrt{x^{2} + x} - 1 \right |}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^2+x)^(3/2)/(x^2+1),x, algorithm="giac")

[Out]

(1/4*I + 1/4)*sqrt(2*sqrt(2) - 2)*(I/(sqrt(2) - 1) + 1)*log(2*sqrt(10*sqrt(2) - 14)*(-I/(5*sqrt(2) - 7) + 1) -
 (4*I + 8)*x + (4*I + 8)*sqrt(x^2 + x) + 8*I - 4) - (1/4*I + 1/4)*sqrt(2*sqrt(2) - 2)*(I/(sqrt(2) - 1) + 1)*lo
g(-2*sqrt(10*sqrt(2) - 14)*(-I/(5*sqrt(2) - 7) + 1) - (4*I + 8)*x + (4*I + 8)*sqrt(x^2 + x) + 8*I - 4) + (1/4*
I + 1/4)*sqrt(2*sqrt(2) + 2)*(I/(sqrt(2) + 1) + 1)*log(2*sqrt(2*sqrt(2) - 2)*(-I/(sqrt(2) - 1) + 1) - 4*x + 4*
sqrt(x^2 + x) - 4*I) - (1/4*I + 1/4)*sqrt(2*sqrt(2) + 2)*(I/(sqrt(2) + 1) + 1)*log(-2*sqrt(2*sqrt(2) - 2)*(-I/
(sqrt(2) - 1) + 1) - 4*x + 4*sqrt(x^2 + x) - 4*I) + 1/4*sqrt(x^2 + x)*(2*x + 5) + 5/8*log(abs(-2*x + 2*sqrt(x^
2 + x) - 1))